package com.movitech.mobile.cz.base.sys.mapper.ext;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSAttachment;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSAttachmentReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 附件 Mapper 接口
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-03-01
 */
@Component
@Mapper
public interface ExtSAttachmentMapper extends BaseMapper<ExtSAttachment> {
    List<ExtSAttachment> selectExtByEntity(ExtSAttachmentReq extSAttachmentReq);

	List<ExtSAttachment> getExtByFormIdAndAttachmentType(@Param("formId")String formId, @Param("type")Integer type, @Param("subType")Integer subType);

	int deleteBatch(@Param("relatedId")String relatedId,@Param("attachmentType") int attachmentType,@Param("attachmentSubType") int attachmentSubType);

	List<ExtSAttachment> getExtByRelatedIdAndTypeAndSubType(@Param("relatedId")String relatedId, @Param("type")Integer type, @Param("subType")Integer subType);

	List<ExtSAttachment> getSAttachmentByCnd(Map<String,Object> mapParams);
}
